import QtQuick 1.0
import com.nokia.symbian 1.1

CommonDialog {
    id: root

    property alias questionInput: questionField.text
    property alias answerInput: answerField.text

    property string dialogTitleText: ""

    titleText: dialogTitleText

    content: Column {
        spacing: 8
        anchors.left: parent.left; anchors.right: parent.right

        TextField{
            id: questionField
            placeholderText: "Enter Question"
            anchors{
                right: parent.right; left: parent.left
            }
        }

        TextField{
            id: answerField
            placeholderText: "Enter Answer"
            anchors{
                right: parent.right; left: parent.left
            }
        }
    }

    onStatusChanged: {
        if(status == DialogStatus.Opening) {
            questionInput = "";
            answerInput = "";
        }
    }

    buttons: ButtonRow {
        anchors { left: parent.left; right:  parent.right; margins: 16 }
        Button { text: "Ok" ;    onClicked: root.accept();}
        Button { text: "Cancel"; onClicked: root.reject();}
    }
}
